1. Field
Example embodiments of the present invention relate to orientation calculation apparatuses and programs, and more particularly to an orientation calculation apparatus and program for calculating an orientation (gravitational direction) of an input device.
2. Description of the Background Art
Until now, there have been devised techniques for calculating an orientation of an input device using an acceleration sensor and a gyroscope. For example, Patent Document 1 (Japanese Laid-Open Patent Publication No. 2000-308756) discloses a game apparatus using an input control device including an acceleration sensor and a gyroscope. This game apparatus controls a sword held by a game character in accordance with movement of the input control device. Specifically, data representing an action of wielding the sword is generated based on an output from the acceleration sensor, and data representing an orientation of the sword is generated based on an output from the gyroscope.
When the orientation is calculated using the gyroscope as described in Patent Document 1, some error may occur between the calculated orientation and an actual orientation of the input control device. For example, when the movement of the input control device is slow, the gyroscope may fail to detect an angular rate of the input control device, whereas when the movement of the input control device is vigorous, the angular rate of the input control device may be outside a range in which the gyroscope is allowed to detect the angular rate. Further, also when the angular rate abruptly changes in a period shorter than an interval between outputs of angular rate data, some error may occur. In addition, as for the gyroscope, an error called “drift” may occur in its output due to some factors including temperature. The error of the angular rate is cumulatively added to the orientation calculated based on the angular rate over the passage of time, and therefore the error of the orientation may be increased. In Patent Document 1, the error of the orientation calculated by the gyroscope is not considered, and therefore the orientation may not be accurately calculated.